package com.tinem.platform.module.starter.jpa.entity.oauth;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author fzh
 * @version v1
 * @program: platform
 * @className UserSessionToken
 * @description 用户token
 * @site
 * @company 
 * @create 2022-5-31
 */
@Data
@Entity
@ToString
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Table(name="t_user_session_token")
@ApiModel("用户token")
public class UserSessionToken implements Serializable,Cloneable{
    @Id
    @Column(name = "c_id",nullable=true)
    @ApiModelProperty(name = "id", value = "jit",required = true)
    private String id;
    
    @Column(name = "c_client_id",nullable=true)
    @ApiModelProperty(name = "clientId", value = "client_id",required = true)
    private String clientId;
    
    @Column(name = "c_user_id",nullable=true)
    @ApiModelProperty(name = "userId", value = "用户id",required = true)
    private String userId;
    
    @Column(name = "c_exp",nullable=true)
    @ApiModelProperty(name = "exp", value = "过期时间",required = true)
    private java.util.Date exp;
    
    @Column(name = "c_jwt",nullable=true)
    @ApiModelProperty(name = "jwt", value = "jwt",required = true)
    private String jwt;
    
    @Version
    @Column(name = "c_revision",nullable=true)
    @ApiModelProperty(name = "revision", value = "乐观锁",required = false)
    private Integer revision;
    
    @Column(name = "c_created_by",nullable=true)
    @ApiModelProperty(name = "createdBy", value = "创建人",required = false)
    private String createdBy;
    
    @Column(name = "c_created_time",nullable=true,insertable = false,updatable = false)
    @ApiModelProperty(name = "createdTime", value = "创建时间",required = false)
    private java.util.Date createdTime;
    
    @Column(name = "c_updated_by",nullable=true)
    @ApiModelProperty(name = "updatedBy", value = "更新人",required = false)
    private String updatedBy;
    
    @Column(name = "c_updated_time",nullable=true,insertable = false,updatable = false)
    @ApiModelProperty(name = "updatedTime", value = "更新时间",required = false)
    private java.util.Date updatedTime;

}